#-------------------------------------------------
#
# Project created by QtCreator 2024-10-31T22:55:01
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = flower-player
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


SOURCES += main.cpp\
    ffplay.cpp \
        mainwindow.cpp \
    ctrlbarwidget.cpp \
    state.cpp \
    titlebarwidget.cpp \
    playlistwidget.cpp \
    displaywidget.cpp \
    ffmsg_queue.cpp \
    ffplay.cpp \
    ijkmediaplayer.cpp \
    ffplay_def.cpp

HEADERS  += mainwindow.h \
    ctrlbarwidget.h \
    ffplay.h \
    state.h \
    titlebarwidget.h \
    playlistwidget.h \
    displaywidget.h \
    ffmsg_queue.h \
    ffmsg.h \
    ffplay.h \
    ijkmediaplayer.h \
    ffplay_def.h

FORMS    += mainwindow.ui \
    ctrlbarwidget.ui \
    titlebarwidget.ui \
    playlistwidget.ui \
    displaywidget.ui


win32 {
    FFMPEG_PATH = D:\\env\\lib2h\\ffmpeg\\4.2.1
    FFMPEG_LIB_PATH = $$FFMPEG_PATH\\lib\\x86
    SDL_PATH = D:\\env\\lib2h\\SDL2
    SDL_LIB_PATH = $$SDL_PATH\\lib\\x86
}

win64 {
    FFMPEG_PATH = D:\\env\\lib2h\\ffmpeg\\4.2.1
    FFMPEG_LIB_PATH = $$FFMPEG_PATH\\lib\\x64
    SDL_PATH = D:\\env\\lib2h\\SDL2
    SDL_LIB_PATH = $$SDL_PATH\\lib\\x64
}

unix {
    FFMPEG_PATH = /usr/local/ffmpeg/4.2.1
    FFMPEG_LIB_PATH = $$FFMPEG_PATH
    SDL_PATH = /usr/local/SDL2
    SDL_LIB_PATH = $$SDL_PATH
}

# 通用配置
INCLUDEPATH += $$FFMPEG_PATH\\include
LIBS += $$FFMPEG_LIB_PATH\\avformat.lib \
        $$FFMPEG_LIB_PATH\\avcodec.lib \
        $$FFMPEG_LIB_PATH\\avdevice.lib \
        $$FFMPEG_LIB_PATH\\avfilter.lib \
        $$FFMPEG_LIB_PATH\\avutil.lib \
        $$FFMPEG_LIB_PATH\\postproc.lib \
        $$FFMPEG_LIB_PATH\\swresample.lib \
        $$FFMPEG_LIB_PATH\\swscale.lib

INCLUDEPATH += $$SDL_PATH\\include
LIBS += $$SDL_LIB_PATH\\SDL2.lib

RESOURCES += \
    icon.qrc

win32 {
INCLUDEPATH += $$PWD/ffmpeg-4.2.1-win32-dev/include
LIBS += $$PWD/ffmpeg-4.2.1-win32-dev/lib/avformat.lib   \
        $$PWD/ffmpeg-4.2.1-win32-dev/lib/avcodec.lib    \
        $$PWD/ffmpeg-4.2.1-win32-dev/lib/avdevice.lib   \
        $$PWD/ffmpeg-4.2.1-win32-dev/lib/avfilter.lib   \
        $$PWD/ffmpeg-4.2.1-win32-dev/lib/avutil.lib     \
        $$PWD/ffmpeg-4.2.1-win32-dev/lib/postproc.lib   \
        $$PWD/ffmpeg-4.2.1-win32-dev/lib/swresample.lib \
        $$PWD/ffmpeg-4.2.1-win32-dev/lib/swscale.lib
INCLUDEPATH += $$PWD/SDL2/include
LIBS += $$PWD/SDL2/lib/x86/SDL2.lib
}

#CONFIG += console
